import Vue from 'vue';
import ElementUI from 'element-ui';
import vueresource from 'vue-resource';
import 'element-ui/lib/theme-chalk/index.css';
import 'normalize.css/normalize.css';
import './styles/index.scss';
import App from './App.vue';
import router from './router';
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
  state: {
    user: {
      realname: '未登录',
      avatar:'https://www.google.com/search?q=touxiang&tbm=isch&source=iu&ictx=1&fir=n5GERRyW5IfixM%253A%252Cg-VSWxPxZDCnfM%252C_&usg=AFrqEze91QnuoMgG5LwXt42lWBqRwknXEw&sa=X&ved=2ahUKEwjkkv6NxvrcAhXrt1kKHfvuBzMQ9QEwAnoECAUQCA#imgrc=n5GERRyW5IfixM:'
    }
  },
  mutations: {
    setUser(state,user){
      state.user = user;
    }
  }
})

Vue.use(ElementUI);
Vue.use(vueresource);
Vue.config.productionTip = false;

new Vue({
  store,
  router,
  render: h => h(App),
}).$mount('#app');


